package com.ruoyi.glsims.controller;

import java.util.List;

import com.ruoyi.glsims.domain.Prove;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.glsims.service.IGraduaterService;
import com.ruoyi.common.core.page.TableDataInfo;

/**
 * 毕业生信息Controller
 * 
 * @author airted
 * @date 2023-09-13
 */
@RestController
@RequestMapping("/gradu_info/gra_stu_info")
public class GraduaterController extends BaseController
{
    @Autowired
    private IGraduaterService graduaterService;

    /**
     * 查询毕业生信息列表
     */
    @PreAuthorize("@ss.hasPermi('gradu_info:gra_stu_info:list')")
    @GetMapping("/list")
    public TableDataInfo list(Prove prove)
    {
        startPage();
        List<Prove> list = graduaterService.selectGraduaterList(prove);
        return getDataTable(list);
    }

    /**
     * 获取毕业生信息详细信息
     */
    @PreAuthorize("@ss.hasPermi('gradu_info:gra_stu_info:query')")
    @GetMapping(value = "/{proveId}")
    public AjaxResult getInfo(@PathVariable("proveId") Long proveId)
    {
        return success(graduaterService.selectGraduaterByProveId(proveId));
    }
}
